package vn.edu.vttu;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class MainBT4 extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main_bt4);
	}
public void inbangcuuchuong(View view){
	
	
	 EditText soN = (EditText) findViewById(R.id.nhapn);
	int soNValue = Integer.parseInt(soN.getText().toString());
	
	TextView ketQua = (TextView) findViewById(R.id.ketqua);
	//ketQua.setText("");
	for(int i=1;i<=10;i++){
		int kq = soNValue * i; 
		ketQua.setText(ketQua.getText()+""+soNValue+" x "+i+" = "+kq+"\n");
		}
	}
}